package com.huaxin.hxmoduleworkorder.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.huaxin.hxenum.enums.Unit;
import com.huaxin.hxmoduleworkorder.common.enums.CustomerType;
import com.huaxin.hxmoduleworkorder.common.enums.InspectionTemplateItemCategory;
import com.huaxin.hxmoduleworkorder.common.enums.InspectionTemplateItemEquipmentType;
import com.huaxin.hxmoduleworkorder.common.enums.InspectionTemplateItemType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@TableName("inspection_template_item")
@EqualsAndHashCode(callSuper = true)
public class InspectionTemplateItem extends BaseModel {
    @TableField(value = "code")
    @Schema(description = "编码", example = "ELEC_001")
    private String code;

    @TableField(value = "name")
    @Schema(description = "名称", example = "电表读数是否正常")
    private String name;

    @TableField(value = "type")
    @Schema(description = "类型：check/measure/photo/text", example = "photo")
    private String type;

    @TableField(value = "standard_value")
    @Schema(description = "标准值或规范说明", example = "220V±5%")
    private String standardValue;

    @TableField(value = "unit")
    @Schema(description = "单位", example = "V")
    private Unit unit;

    @TableField(value = "input_hint")
    @Schema(description = "填写提示", example = "请拍摄电表当前读数照片")
    private String inputHint;

    @TableField(value = "category")
    @Schema(description = "所属类别：electrical_safety/equipment_operation/environmental_inspection", example = "electrical_safety")
    private InspectionTemplateItemCategory category;

    @TableField(value = "equipment_type")
    @Schema(description = "适用设备类型：switchboard/transformer/cable/motor/generator/control_panel", example = "switchboard")
    private InspectionTemplateItemEquipmentType equipmentType;

    @TableField(value = "customer_type")
    @Schema(description = "适用客户类型：commercial/industrial/residential", example = "commercial")
    private CustomerType customerType;

    @TableField(value = "sort_order")
    @Schema(description = "排序", example = "1")
    private Integer sortOrder;

    @TableField(value = "is_required")
    @Schema(description = "是否必填", example = "1")
    private Integer isRequired;
}

